From d985fae1b44067b47f06175b26b3c9d8db382dcc Mon Sep 17 00:00:00 2001 From: "kaf24@scramble.cl.cam.ac.uk" Date: Tue, 10 Aug 2004 21:12:00 +0000 Subject: [PATCH] bitkeeper revision 1.1159.17.6 (41193a207z6kESTDa2SXhULAPY-Bmw) Fix the broken build. Also avoid floating-point code in Xen. --- tools/libxc/xc_linux_restore.c | 3 +-- xen/arch/x86/Rules.mk | 3 +++ xen/common/sched_fair_bvt.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 1ce1837e35..62050c83eb 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -224,8 +224,7 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt) /* XXX create domain on CPU=-1 so that in future it auto load ballances by default */ if ( xc_domain_create( xc_handle, nr_pfns * (PAGE_SIZE / 1024), - name, - -1, 1, &dom ) ) + name, -1, &dom ) ) { xcio_error(ioctxt, "Could not create domain. pfns=%d, %dKB", nr_pfns,nr_pfns * (PAGE_SIZE / 1024)); diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index 2ecca1fffe..e419bba514 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -8,6 +8,9 @@ CFLAGS := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -O3 CFLAGS += -iwithprefix include -Wall -Werror -fomit-frame-pointer -pipe CFLAGS += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls +# Prevent floating-point variables from creeping into Xen. +CFLAGS += -msoft-float + ifeq ($(TARGET_SUBARCH),x86_32) CFLAGS += -m32 -march=i686 LDFLAGS := --oformat elf32-i386 diff --git a/xen/common/sched_fair_bvt.c b/xen/common/sched_fair_bvt.c index 165c128753..ac37c582eb 100644 --- a/xen/common/sched_fair_bvt.c +++ b/xen/common/sched_fair_bvt.c @@ -252,7 +252,7 @@ static void fbvt_wake(struct domain *d) * values, the virtual time can be determined as: * SVT - const * TIME_SLEPT */ - io_warp = (int)(0.5 * inf->time_slept); + io_warp = inf->time_slept/2; if ( io_warp > 1000 ) io_warp = 1000; @@ -551,7 +551,7 @@ static task_slice_t fbvt_do_schedule(s_time_t now) * domains earlier in virtual time). Together this should give quite * good control both for CPU and IO-bound domains. */ - LAST_VTB(cpu) = (int)(0.2 * next_inf->time_slept); + LAST_VTB(cpu) = next_inf->time_slept/5; if(LAST_VTB(cpu) / next_inf->mcu_advance > max_vtb / MCU) LAST_VTB(cpu) = max_vtb * next_inf->mcu_advance / MCU; -- 2.30.2